import * as React from 'react';
import { Icon } from 'antd';

import './index.less';

export default function WrapIcon(props) {
    let {type = ''} = props;
    type = type.toLowerCase();
    switch(type) {
        case 'now':
        case 'yyb':
        case 'huayang':
        case 'qq':
        case 'qzone':
        case 'qqcomic':
        case 'huayang':
        case 'nowsdk':
        case 'qqbrowser':
        case 'mobile safari':
            return <div className={`ward-icon ${type}`} />
        case 'ios':
            return <Icon {...Object.assign({}, props, {type: 'apple'})} ></Icon>
        case 'chrome webview':
        case 'chrome':
            return <Icon {...Object.assign({}, props, {type: 'chrome'})} ></Icon>

        default:
            return (
                <Icon {...Object.assign({}, props, {type})} ></Icon>
            );
    }
}